<?xml version="1.0" encoding="UTF-8"?>

<output>
     
    <ticket>
        <line size="0">
            <text align="center" length="42"  bold="true" underline="false">CHOW TIME Buffet and Grill</text>
        </line>
        <line size="0">
            <text align="center" length="42"  bold="false" underline="false">4207 Hacks Cross Rd.,</text>
        </line>
        <line size="0">
            <text align="center" length="42"  bold="false" underline="false">Memphis, TN 38125</text>
        </line>
        
        <line size="0">
            <text align="center" length="42"  bold="false" underline="false">Tel: (901) 737-0272</text>
        </line>
        
        <line size="0">
            <text align="center" length="42"  bold="false" underline="false">Fax: (901) 737-7978</text>
        </line>
        
         <line size="0"> <text  align="left" length="40"   bold="false"  underline="false"> </text></line> 

        <line size="0">
            <text align="center" length="26"  bold="false" underline="true">Buffet ($ordertype)</text>
            <text align="right" length="4"  bold="true"  underline="false" size="33">B$ticket0.getInt("Ticketid")</text>
            
            <text align="left" length="4"  bold="true"  underline="false">$ticket0.getInt("Dishgroupid","0:00")</text>
            
        </line>
        <line size="0">
               <text align="left" length="2"  bold="false"  underline="false">  </text>
        </line>
        <line size="0">
               <text align="center" length="40"  bold="false"  underline="false">$ticket0.getString("FName")</text>
        </line>
        <line size="0">
               <text align="center" length="40"  bold="false"  underline="false">$printdate</text>
        </line>
        
        <line size="0"> 
        <text  align="left" length="40"   bold="false"  underline="false">-----------------------------------------</text>
        </line>
        #foreach ($ticketline0 in $ticket0)
        
        	#set ($temp1 = $ticketline0.getString("customerType"))
          #set ($temp2 = $ticketline0.getString("Customer"))
          #set ($temp3 = $ticketline0.getString("Tableid"))
        	#set ($tempVar2 = " $temp1 - $temp2         Table:$temp3")
        	#if ($tempVar==$tempVar2 ) )
        	#else
        		#set ( $tempVar = $tempVar2) 

        		<line size="0">
          		   <text align="left" length="40"   bold="false"  underline="false">$tempVar</text>
        		</line>
        	#end
        <line size="0">

               <text align="left" length="7"   bold="false"  underline="false">        </text>
              <text align="left" length="20"   bold="false"  underline="false">$ticketline0.getString("myenDishname")</text>
             <text align="right" length="15"   bold="false"  underline="false">$ticketline0.getDouble("price1")</text>
            

        </line> 

			  
       #end 
        <line size="0"> 
        <text  align="left" length="40"   bold="false"  underline="false">-----------------------------------------</text>
        </line>
        <line size="0">
               <text align="left" length="14"  bold="false"  underline="false">Total #</text>
               <text align="right" length="26"  bold="false"  underline="false">$ticket0.Count</text>
        </line>
        <!--
        <line size="0">
               <text align="left" length="14"  bold="false"  underline="false">Charge:</text>
               <text align="right" length="26"  bold="false"  underline="false">$ticket0.getDouble("DCharge")</text>
        </line>
        -->
        <line size="0">
               <text align="left" length="14"  bold="false"  underline="false">Subtotal:</text>
               <text align="right" length="26"  bold="false"  underline="false">$ticket0.getDouble("Subtotal")</text>
        </line>
        <line size="0">
               <text align="left" length="14"  bold="false"  underline="false">Tax:</text>
               <text align="right" length="26"  bold="false"  underline="false">$ticket0.getDouble("Tax")</text>
        </line>
        
         #if ($ticket0.getDouble("Discount") != '$0.00' )
        <line size="0">
               <text align="left" length="14"  bold="false"  underline="false">Discount:</text>
               <text align="right" length="26"  bold="false"  underline="false">-$ticket0.getDouble("Discount")</text>
        </line>
        #end


        #if ($ticket0.getDouble("paymenttips") !='$0.00' )
        <!--
        <line size="1">
               <text align="left" length="14"  bold="true"  underline="false">Amount Due:</text>
               <text align="right" length="26"  bold="true"  underline="false">$ticket0.getDouble("orderamountdue")</text>
        </line>
        -->
        <line size="0">
               <text align="left" length="14"  bold="false"  underline="false">Service Charge::</text>
               <text align="right" length="26"  bold="false"  underline="false">$ticket0.getDouble("paymenttips")</text>
        </line>
        #end
        
        <line size="1">
               <text align="left" length="14"  bold="true"  underline="false">Total:</text>
               <text align="right" length="26"  bold="true"  underline="false"> $ticket0.getDouble("ordertotalamount") </text>
        </line>
        <line size="0">
               <text align="left" length="14"  bold="false"  underline="false">Payment Type:</text>
               <text align="right" length="26"  bold="false"  underline="false">$ticket0.getString("paymenttype")</text>
        </line>
        <line size="0">
               <text align="left" length="16"  bold="false"  underline="false">Payment Amount:</text>
               <text align="right" length="24"  bold="false"  underline="false">$ticket0.getDecimal("paymentamount")</text>
        </line>
        
        #if ($additional1=="Change" )
                <line size="0">
                   <text align="left" length="14"  bold="false"  underline="false">Change</text>
                   <text align="right" length="26"  bold="false"  underline="false">$additional2</text>
               </line>
        #else
             #if ($additional1=="Unpaid Balance" )
        	
        	     <line size="0">
                   <text align="left" length="14"  bold="false"  underline="false">Unpaid Balance</text>
                   <text align="right" length="26"  bold="false"  underline="false">$additional2</text>
               </line>
             #end
                #if ($additional1=="Gratuity Paid" )
        	
                   <line size="0">
                   <text align="left" length="14"  bold="false"  underline="false">Gratuity Paid</text>
                   <text align="right" length="26"  bold="false"  underline="false">$additional2</text>
                   </line>
                #end
                	   
 
        #end
        #set ($temp1 = $mysession.getCurrentLogicTime())
        #set ($temp2 = "00")
        #set ($temp3 = $ticket0.getInt("Ticketid","0:000"))
        #set ($temp4 = $ticket0.getInt("Dishgroupid","0:00"))

        <barcode type="CODE39">$temp1$temp2$temp3$temp4</barcode>

       <line size="3"><text> </text></line>
       
       <line size="3"><text> </text></line>
       <line size="3"><text> </text></line>
       <line size="3"><text> </text></line>
       <line size="3"><text> </text></line>

       
       
       <cut></cut> 
      
      
     </ticket>

</output>
